/**
 * Alipay.com Inc.
 * Copyright (c) 2004-2013 All Rights Reserved.
 */
package com.pingan.mobilegw.core.service.session;

/**
 *  session 配置
 * 
 * @author jinwenxiang
 * @version $Id: SessionConfig.java, v 0.1 2013-11-21 下午8:01:50 jinwenxiang Exp $
 */
public class SessionConfig {

    /** 单例 */
    private static SessionConfig sessionConfig       = new SessionConfig();

    /** 服务器名 */
    private String               hostName;
    /** cookie名称 */
    private String               sessionCookieName;
    /** cookie域 */
    private String               sessionCookieDomain;
    /** cookie max age */
    private int                  sessionCookieMaxAge = 0;
    /** cookie有效期 */
    private int                  sessionMaxInactiveInterval;

    /**
     * 私有
     */
    private SessionConfig() {
    }

    /**
     * 获取单例配置
     * 
     * @return
     */
    public static SessionConfig getConfig() {
        return sessionConfig;
    }

    /**
     * Getter method for property <tt>sessionCookieName</tt>.
     * 
     * @return property value of sessionCookieName
     */
    public String getSessionCookieName() {
        return sessionCookieName;
    }

    /**
     * Setter method for property <tt>sessionCookieName</tt>.
     * 
     * @param sessionCookieName value to be assigned to property sessionCookieName
     */
    public void setSessionCookieName(String sessionCookieName) {
        this.sessionCookieName = sessionCookieName;
    }

    /**
     * Getter method for property <tt>sessionCookieDomain</tt>.
     * 
     * @return property value of sessionCookieDomain
     */
    public String getSessionCookieDomain() {
        return sessionCookieDomain;
    }

    /**
     * Setter method for property <tt>sessionCookieDomain</tt>.
     * 
     * @param sessionCookieDomain value to be assigned to property sessionCookieDomain
     */
    public void setSessionCookieDomain(String sessionCookieDomain) {
        this.sessionCookieDomain = sessionCookieDomain;
    }

    /**
     * Getter method for property <tt>sessionCookieMaxAge</tt>.
     * 
     * @return property value of sessionCookieMaxAge
     */
    public int getSessionCookieMaxAge() {
        return sessionCookieMaxAge;
    }

    /**
     * Setter method for property <tt>sessionCookieMaxAge</tt>.
     * 
     * @param sessionCookieMaxAge value to be assigned to property sessionCookieMaxAge
     */
    public void setSessionCookieMaxAge(int sessionCookieMaxAge) {
        this.sessionCookieMaxAge = sessionCookieMaxAge;
    }

    /**
     * Getter method for property <tt>hostName</tt>.
     * 
     * @return property value of hostName
     */
    public String getHostName() {
        return hostName;
    }

    /**
     * Setter method for property <tt>hostName</tt>.
     * 
     * @param hostName value to be assigned to property hostName
     */
    public void setHostName(String hostName) {
        this.hostName = hostName;
    }

    /**
     * Getter method for property <tt>sessionMaxInactiveInterval</tt>.
     * 
     * @return property value of sessionMaxInactiveInterval
     */
    public int getSessionMaxInactiveInterval() {
        return sessionMaxInactiveInterval;
    }

    /**
     * Setter method for property <tt>sessionMaxInactiveInterval</tt>.
     * 
     * @param sessionMaxInactiveInterval value to be assigned to property sessionMaxInactiveInterval
     */
    public void setSessionMaxInactiveInterval(int sessionMaxInactiveInterval) {
        this.sessionMaxInactiveInterval = sessionMaxInactiveInterval;
    }

}
